<template>
  <input type="text"
    :value="modelValue"
    @input="emitValue">
</template>

<script setup lang="ts">
const props = defineProps({
  modelValue: String,
  modelModifiers: { default: () => { } }
})
const emit = defineEmits(['update:modelValue'])


const emitValue = (e) => {
  let value = e.target.value
  if (props.modelModifiers.capitalize) {
    value = value.toUpperCase()
    emit('update:modelValue', value)
  }
}
</script>

<style scoped>
</style>